package com.itheima.mall.service.oms;


import com.itheima.mall.api.oms.CompanyAddressApi;
import com.itheima.mall.pojo.oms.OmsCompanyAddress;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanyAddressService {
    @DubboReference
    private CompanyAddressApi companyAddressApi;

/**
     * 获取所有收货地址
     * @return
     */

    public List<OmsCompanyAddress> listAll() {
        List<OmsCompanyAddress> omsCompanyAddressList = companyAddressApi.listAll();
        if (omsCompanyAddressList == null){
            return null;
        }
        return omsCompanyAddressList;
    }
}
